﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="cn_member_center_order_info" Codebehind="order_info.aspx.cs" %>


<%@ Register Src="../UserControl/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../UserControl/top_ad.ascx" TagName="top_ad" TagPrefix="uc2" %>
<%@ Register Src="../UserControl/member_menu.ascx" TagName="member_menu" TagPrefix="uc3" %>
<%@ Register Src="../UserControl/footer.ascx" TagName="footer" TagPrefix="uc4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>订单详情，<%=(new Gift.WebApp.BasicSet()).TitleBind() %></title>
    <meta name="Keywords" content="<%=(new Gift.WebApp.BasicSet()).KeywordBind() %>" />
    <meta name="Description" content="<%=(new Gift.WebApp.BasicSet()).DescriptionBind() %>" />
    <link href="/script/css/public.css" type="text/css" rel="stylesheet" />
    <link href="/script/css/member.css" type="text/css" rel="stylesheet" />
    <link href="/script/css/ie.css" type="text/css" rel="stylesheet" />

    <script language="Javascript" type="text/javascript" src="/script/js/jquery-1.6.2.min.js"></script>

    <!--登陆注册 弹出窗口-->
    <style type="text/css" media="all">
        @import "/script/js/login/thickbox.css";
    </style>

    <script src="/script/js/login/thickbox.js" type="text/javascript"></script>

    <!-- 头部全部分类 三级导航-->

    <script type="text/javascript" src="/script/jjs/allmenu.js"></script>
    
     <link href="/script/art_dialog/skins/idialog.css" rel="stylesheet" />

    <script type="text/javascript" src="/script/art_dialog/artDialog.js"></script>

    <script type="text/javascript" src="/script/art_dialog/plugins/iframeTools.source.js"></script>

    <script type="text/javascript" src="/script/js/art_dialog.js"></script>
    
    <script type="text/javascript">
        $(function () {
            $("#btnOrderPay").click(function () {
                if ($("input[name='pay_bank']:checked").val() != "货到付款" && $("input[name='pay_bank']:checked").val() != "预存款" && $("input[name='pay_bank']:checked").val() != "Paypal") {
                    window.open("/alipay/alipayto.aspx?orderNo=" + $("#hdfOrderNo").val() + "&pay_bank=" + $("input[name='pay_bank']:checked").val());
                }
                else if ($("input[name='pay_bank']:checked").val() == "Paypal") {
                    window.open("/paypal/reviewByPaypal.aspx?orderNo=" + $("#hdfOrderNo").val());
                }
                else if ($("input[name='pay_bank']:checked").val() == "预存款") {
                    $.ajax({
                        type: "POST",
                        url: "orderPayHandler.ashx",
                        data: "orderNo=" + $("#hdfOrderNo").val() + "&payment=" + escape("预存款"),
                        success: function (msg) {
                            if (msg == "0") {
                                art.dialog.tips("您的余额不足以支付订单金额！", 1.5);
                            }
                            else if (msg == "1") {
                                art.dialog.tips("恭喜您，支付成功！", 1.5);
                                setTimeout("window.location.reload()", 2000);
                            }
                        }
                    });
                }
                return false;
            });
            $("#btnConfirm").click(function () {
                art.dialog({
                    id: 'testID',
                    content: '您确定已收到货物了吗？',
                    lock: true,
                    fixed: true,
                    opacity: 0.1,
                    button: [
                        {
                            name: '确定',
                            callback: function () {
                                $.ajax({
                                    type: "POST",
                                    url: "confirm_receiving.ashx",
                                    data: "orderNo=" + $("#hdfOrderNo").val(),
                                    success: function (msg) {
                                        window.location.reload();
                                    }
                                });
                                return false;
                            },
                            focus: true
                        },
                        {
                            name: '取消',
                            callback: function () {
                                art.dialog.tips('你取消了操作');
                            }
                        }
                    ]
                });

            });
        });
    </script>

</head>
<body>
    <uc1:header ID="Header1" runat="server" />
    <uc2:top_ad ID="Top_ad1" runat="server" />
    <div class="container">
        <uc3:member_menu ID="Member_menu1" runat="server" />
        <!--end leftnav-->
        <div class="rightcontent">
            <h5>
                <strong>订单详情</strong></h5>
            <div class="order_detail">
                <%Response.Write(OrderBind()); %>
            </div>
            <!--end order_detail 订单详情结束-->
        </div>
        <!--end rightcontent-->
        <span class="clear"></span>
    </div>
    <uc4:footer ID="Footer1" runat="server" />
</body>
</html>
